<script type="text/javascript">	
	$(document).ready(function(){
		$('#newpass').focus();
		$('#modificar').on('click',function(e){
			if (hasMsg('div-msg'));
				$('#div-msg').fadeOut();
			//console.log("entra");
			var npass = $('#newpass').val();
			npass=encriptar(npass);
			var cpass = $('#confirmpass').val();
			cpass=encriptar(cpass);
			g("ajax.php?"+a('cambiarClave')+v('user')+c('newpass',npass)+c('confirmpass',cpass),'result','msg','div-img',false);
		});
		$('#volver').on('click',function(e){
			$(location).attr('href','./login.php');
		});
	});
	
</script>
<?php
$usuario=$_GET['usuario'];
?>
<div class="row">
	<div class="col-xs-offset-3">
		<img src="../img/symbol/changePassword.png" style="display:inline;"/>
		<h2 class="form-signin-heading" style="text-align:center;display:inline;">Modificar Contrase&ntilde;a</h2>
	</div>
</div>
<div class="row margin-top-1em">
	<label for="newpass" class="col-xs-4 control-label label-custom">Nueva Contrase&ntilde;a</label>
	<div class="col-xs-8">
		<input type="password" class="form-control" id="newpass" placeholder="" tabindex="1">
	</div>
</div>
<div class="row margin-top-1em">
	<label for="confirmpass" class="col-xs-4 control-label label-custom">Confirme Contrase&ntilde;a</label>
	<div class="col-xs-8">
		<input type="password" class="form-control" id="confirmpass" placeholder="" tabindex="2">
	</div>
</div>
<div class="row margin-top-1em" text-align="center">
	<div id="div-img" class="col-xs-offset-3"></div>
</div>
<input type="hidden" id="user" value="<?php echo $usuario;?>"/>
<div class="row margin-top-1em">
	<div class="col-xs-offset-3" style="text-align:center;">
		<button id="modificar" class="btn btn-lg btn-success">Modificar</button>
		<button id="volver" class="btn btn-lg btn-danger">Volver</button>
	</div>
</div>
<div id="msg" class="margin-top-1em" style="hidden:true;">
</div>
<div id="result">
</div>